3.7.38 \(\int \frac {A+B x}{x^3 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx\)

Optimal. Leaf size=162 \[ \frac {(a+b x) (A b-a B)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {770, 77} \begin {gather*} \frac {(a+b x) (A b-a B)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b \log (x) (a+b x) (A b-a B)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (a+b x) (A b-a B) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

-(A*(a + b*x))/(2*a*x^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + ((A*b - a*B)*(a + b*x))/(a^2*x*Sqrt[a^2 + 2*a*b*x + b
^2*x^2]) + (b*(A*b - a*B)*(a + b*x)*Log[x])/(a^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2]) - (b*(A*b - a*B)*(a + b*x)*Log
[a + b*x])/(a^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2])

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 770

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Dis
t[(a + b*x + c*x^2)^FracPart[p]/(c^IntPart[p]*(b/2 + c*x)^(2*FracPart[p])), Int[(d + e*x)^m*(f + g*x)*(b/2 + c
*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && EqQ[b^2 - 4*a*c, 0]

Rubi steps

\begin {align*} \int \frac {A+B x}{x^3 \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{x^3 \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A}{a b x^3}+\frac {-A b+a B}{a^2 b x^2}+\frac {A b-a B}{a^3 x}+\frac {b (-A b+a B)}{a^3 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=-\frac {A (a+b x)}{2 a x^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {(A b-a B) (a+b x)}{a^2 x \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {b (A b-a B) (a+b x) \log (x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {b (A b-a B) (a+b x) \log (a+b x)}{a^3 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 79, normalized size = 0.49 \begin {gather*} -\frac {(a+b x) \left (2 b x^2 \log (x) (a B-A b)+2 b x^2 (A b-a B) \log (a+b x)+a (a A+2 a B x-2 A b x)\right )}{2 a^3 x^2 \sqrt {(a+b x)^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

-1/2*((a + b*x)*(a*(a*A - 2*A*b*x + 2*a*B*x) + 2*b*(-(A*b) + a*B)*x^2*Log[x] + 2*b*(A*b - a*B)*x^2*Log[a + b*x
]))/(a^3*x^2*Sqrt[(a + b*x)^2])

________________________________________________________________________________________

IntegrateAlgebraic [B]  time = 3.82, size = 1251, normalized size = 7.72 \begin {gather*} \frac {2 A b^2 \tanh ^{-1}\left (\frac {\sqrt {b^2} x}{a}-\frac {\sqrt {a^2+2 b x a+b^2 x^2}}{a}\right ) \left (\sqrt {a^2+2 b x a+b^2 x^2}-\sqrt {b^2} x\right )^4}{a^3 \left (a^4+4 b x a^3+12 b^2 x^2 a^2-4 \sqrt {b^2} x \sqrt {a^2+2 b x a+b^2 x^2} a^2+16 b^3 x^3 a-8 b \sqrt {b^2} x^2 \sqrt {a^2+2 b x a+b^2 x^2} a+8 b^4 x^4-8 \left (b^2\right )^{3/2} x^3 \sqrt {a^2+2 b x a+b^2 x^2}\right )}+\frac {\sqrt {a^2+2 b x a+b^2 x^2} \left (-2048 B x^{12} b^{13}-12288 a B x^{11} b^{12}-512 a A x^{10} b^{12}-33280 a^2 B x^{10} b^{11}-2816 a^2 A x^9 b^{11}-53760 a^3 B x^9 b^{10}-6912 a^3 A x^8 b^{10}-57600 a^4 B x^8 b^9-9984 a^4 A x^7 b^9-43008 a^5 B x^7 b^8-9408 a^5 A x^6 b^8-22848 a^6 B x^6 b^7-6048 a^6 A x^5 b^7-8640 a^7 B x^5 b^6-2688 a^7 A x^4 b^6-2280 a^8 B x^4 b^5-816 a^8 A x^3 b^5-400 a^9 B x^3 b^4-162 a^9 A x^2 b^4-42 a^{10} B x^2 b^3-19 a^{10} A x b^3-a^{11} A b^2-2 a^{11} B x b^2\right )+\sqrt {b^2} \left (2048 b^{13} B x^{13}+14336 a b^{12} B x^{12}+512 a A b^{12} x^{11}+45568 a^2 b^{11} B x^{11}+3328 a^2 A b^{11} x^{10}+87040 a^3 b^{10} B x^{10}+9728 a^3 A b^{10} x^9+111360 a^4 b^9 B x^9+16896 a^4 A b^9 x^8+100608 a^5 b^8 B x^8+19392 a^5 A b^8 x^7+65856 a^6 b^7 B x^7+15456 a^6 A b^7 x^6+31488 a^7 b^6 B x^6+8736 a^7 A b^6 x^5+10920 a^8 b^5 B x^5+3504 a^8 A b^5 x^4+2680 a^9 b^4 B x^4+978 a^9 A b^4 x^3+442 a^{10} b^3 B x^3+181 a^{10} A b^3 x^2+44 a^{11} b^2 B x^2+20 a^{11} A b^2 x+2 a^{12} b B x+a^{12} A b\right )}{a \sqrt {b^2} \sqrt {a^2+2 b x a+b^2 x^2} \left (-2048 x^{11} b^{12}-12288 a x^{10} b^{11}-33280 a^2 x^9 b^{10}-53760 a^3 x^8 b^9-57600 a^4 x^7 b^8-43008 a^5 x^6 b^7-22848 a^6 x^5 b^6-8640 a^7 x^4 b^5-2280 a^8 x^3 b^4-400 a^9 x^2 b^3-42 a^{10} x b^2-2 a^{11} b\right ) x^2+a \left (2048 x^{12} b^{14}+14336 a x^{11} b^{13}+45568 a^2 x^{10} b^{12}+87040 a^3 x^9 b^{11}+111360 a^4 x^8 b^{10}+100608 a^5 x^7 b^9+65856 a^6 x^6 b^8+31488 a^7 x^5 b^7+10920 a^8 x^4 b^6+2680 a^9 x^3 b^5+442 a^{10} x^2 b^4+44 a^{11} x b^3+2 a^{12} b^2\right ) x^2}+\frac {\frac {2 A b^2}{a^2}-\frac {2 \sqrt {b^2} B x \tanh ^{-1}\left (\frac {\sqrt {a^2+2 b x a+b^2 x^2}-\sqrt {b^2} x}{a}\right ) b}{a^2}+\frac {2 B \sqrt {a^2+2 b x a+b^2 x^2} \tanh ^{-1}\left (\frac {\sqrt {a^2+2 b x a+b^2 x^2}-\sqrt {b^2} x}{a}\right ) b}{a^2}}{\sqrt {a^2+2 b x a+b^2 x^2}-\sqrt {b^2} x} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/(x^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2]),x]

[Out]

(Sqrt[a^2 + 2*a*b*x + b^2*x^2]*(-(a^11*A*b^2) - 19*a^10*A*b^3*x - 2*a^11*b^2*B*x - 162*a^9*A*b^4*x^2 - 42*a^10
*b^3*B*x^2 - 816*a^8*A*b^5*x^3 - 400*a^9*b^4*B*x^3 - 2688*a^7*A*b^6*x^4 - 2280*a^8*b^5*B*x^4 - 6048*a^6*A*b^7*
x^5 - 8640*a^7*b^6*B*x^5 - 9408*a^5*A*b^8*x^6 - 22848*a^6*b^7*B*x^6 - 9984*a^4*A*b^9*x^7 - 43008*a^5*b^8*B*x^7
 - 6912*a^3*A*b^10*x^8 - 57600*a^4*b^9*B*x^8 - 2816*a^2*A*b^11*x^9 - 53760*a^3*b^10*B*x^9 - 512*a*A*b^12*x^10
- 33280*a^2*b^11*B*x^10 - 12288*a*b^12*B*x^11 - 2048*b^13*B*x^12) + Sqrt[b^2]*(a^12*A*b + 20*a^11*A*b^2*x + 2*
a^12*b*B*x + 181*a^10*A*b^3*x^2 + 44*a^11*b^2*B*x^2 + 978*a^9*A*b^4*x^3 + 442*a^10*b^3*B*x^3 + 3504*a^8*A*b^5*
x^4 + 2680*a^9*b^4*B*x^4 + 8736*a^7*A*b^6*x^5 + 10920*a^8*b^5*B*x^5 + 15456*a^6*A*b^7*x^6 + 31488*a^7*b^6*B*x^
6 + 19392*a^5*A*b^8*x^7 + 65856*a^6*b^7*B*x^7 + 16896*a^4*A*b^9*x^8 + 100608*a^5*b^8*B*x^8 + 9728*a^3*A*b^10*x
^9 + 111360*a^4*b^9*B*x^9 + 3328*a^2*A*b^11*x^10 + 87040*a^3*b^10*B*x^10 + 512*a*A*b^12*x^11 + 45568*a^2*b^11*
B*x^11 + 14336*a*b^12*B*x^12 + 2048*b^13*B*x^13))/(a*Sqrt[b^2]*x^2*Sqrt[a^2 + 2*a*b*x + b^2*x^2]*(-2*a^11*b -
42*a^10*b^2*x - 400*a^9*b^3*x^2 - 2280*a^8*b^4*x^3 - 8640*a^7*b^5*x^4 - 22848*a^6*b^6*x^5 - 43008*a^5*b^7*x^6
- 57600*a^4*b^8*x^7 - 53760*a^3*b^9*x^8 - 33280*a^2*b^10*x^9 - 12288*a*b^11*x^10 - 2048*b^12*x^11) + a*x^2*(2*
a^12*b^2 + 44*a^11*b^3*x + 442*a^10*b^4*x^2 + 2680*a^9*b^5*x^3 + 10920*a^8*b^6*x^4 + 31488*a^7*b^7*x^5 + 65856
*a^6*b^8*x^6 + 100608*a^5*b^9*x^7 + 111360*a^4*b^10*x^8 + 87040*a^3*b^11*x^9 + 45568*a^2*b^12*x^10 + 14336*a*b
^13*x^11 + 2048*b^14*x^12)) + ((2*A*b^2)/a^2 - (2*b*Sqrt[b^2]*B*x*ArcTanh[(-(Sqrt[b^2]*x) + Sqrt[a^2 + 2*a*b*x
 + b^2*x^2])/a])/a^2 + (2*b*B*Sqrt[a^2 + 2*a*b*x + b^2*x^2]*ArcTanh[(-(Sqrt[b^2]*x) + Sqrt[a^2 + 2*a*b*x + b^2
*x^2])/a])/a^2)/(-(Sqrt[b^2]*x) + Sqrt[a^2 + 2*a*b*x + b^2*x^2]) + (2*A*b^2*(-(Sqrt[b^2]*x) + Sqrt[a^2 + 2*a*b
*x + b^2*x^2])^4*ArcTanh[(Sqrt[b^2]*x)/a - Sqrt[a^2 + 2*a*b*x + b^2*x^2]/a])/(a^3*(a^4 + 4*a^3*b*x + 12*a^2*b^
2*x^2 + 16*a*b^3*x^3 + 8*b^4*x^4 - 4*a^2*Sqrt[b^2]*x*Sqrt[a^2 + 2*a*b*x + b^2*x^2] - 8*a*b*Sqrt[b^2]*x^2*Sqrt[
a^2 + 2*a*b*x + b^2*x^2] - 8*(b^2)^(3/2)*x^3*Sqrt[a^2 + 2*a*b*x + b^2*x^2]))

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 69, normalized size = 0.43 \begin {gather*} \frac {2 \, {\left (B a b - A b^{2}\right )} x^{2} \log \left (b x + a\right ) - 2 \, {\left (B a b - A b^{2}\right )} x^{2} \log \relax (x) - A a^{2} - 2 \, {\left (B a^{2} - A a b\right )} x}{2 \, a^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/((b*x+a)^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*(2*(B*a*b - A*b^2)*x^2*log(b*x + a) - 2*(B*a*b - A*b^2)*x^2*log(x) - A*a^2 - 2*(B*a^2 - A*a*b)*x)/(a^3*x^2
)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 117, normalized size = 0.72 \begin {gather*} -\frac {{\left (B a b \mathrm {sgn}\left (b x + a\right ) - A b^{2} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | x \right |}\right )}{a^{3}} + \frac {{\left (B a b^{2} \mathrm {sgn}\left (b x + a\right ) - A b^{3} \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{a^{3} b} - \frac {A a^{2} \mathrm {sgn}\left (b x + a\right ) + 2 \, {\left (B a^{2} \mathrm {sgn}\left (b x + a\right ) - A a b \mathrm {sgn}\left (b x + a\right )\right )} x}{2 \, a^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/((b*x+a)^2)^(1/2),x, algorithm="giac")

[Out]

-(B*a*b*sgn(b*x + a) - A*b^2*sgn(b*x + a))*log(abs(x))/a^3 + (B*a*b^2*sgn(b*x + a) - A*b^3*sgn(b*x + a))*log(a
bs(b*x + a))/(a^3*b) - 1/2*(A*a^2*sgn(b*x + a) + 2*(B*a^2*sgn(b*x + a) - A*a*b*sgn(b*x + a))*x)/(a^3*x^2)

________________________________________________________________________________________

maple [A]  time = 0.06, size = 92, normalized size = 0.57 \begin {gather*} -\frac {\left (b x +a \right ) \left (-2 A \,b^{2} x^{2} \ln \relax (x )+2 A \,b^{2} x^{2} \ln \left (b x +a \right )+2 B a b \,x^{2} \ln \relax (x )-2 B a b \,x^{2} \ln \left (b x +a \right )-2 A a b x +2 B \,a^{2} x +A \,a^{2}\right )}{2 \sqrt {\left (b x +a \right )^{2}}\, a^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^3/((b*x+a)^2)^(1/2),x)

[Out]

-1/2*(b*x+a)*(2*A*ln(b*x+a)*x^2*b^2-2*A*ln(x)*x^2*b^2-2*B*ln(b*x+a)*x^2*a*b+2*B*ln(x)*x^2*a*b-2*A*a*b*x+2*B*a^
2*x+A*a^2)/((b*x+a)^2)^(1/2)/x^2/a^3

________________________________________________________________________________________

maxima [A]  time = 0.59, size = 164, normalized size = 1.01 \begin {gather*} \frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} B b \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a^{2}} - \frac {\left (-1\right )^{2 \, a b x + 2 \, a^{2}} A b^{2} \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right )}{a^{3}} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B}{a^{2} x} + \frac {3 \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A b}{2 \, a^{3} x} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{2 \, a^{2} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^3/((b*x+a)^2)^(1/2),x, algorithm="maxima")

[Out]

(-1)^(2*a*b*x + 2*a^2)*B*b*log(2*a*b*x/abs(x) + 2*a^2/abs(x))/a^2 - (-1)^(2*a*b*x + 2*a^2)*A*b^2*log(2*a*b*x/a
bs(x) + 2*a^2/abs(x))/a^3 - sqrt(b^2*x^2 + 2*a*b*x + a^2)*B/(a^2*x) + 3/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*A*b/(a
^3*x) - 1/2*sqrt(b^2*x^2 + 2*a*b*x + a^2)*A/(a^2*x^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x}{x^3\,\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x^3*((a + b*x)^2)^(1/2)),x)

[Out]

int((A + B*x)/(x^3*((a + b*x)^2)^(1/2)), x)

________________________________________________________________________________________

sympy [A]  time = 0.48, size = 131, normalized size = 0.81 \begin {gather*} \frac {- A a + x \left (2 A b - 2 B a\right )}{2 a^{2} x^{2}} - \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} + B a^{2} b - a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} + \frac {b \left (- A b + B a\right ) \log {\left (x + \frac {- A a b^{2} + B a^{2} b + a b \left (- A b + B a\right )}{- 2 A b^{3} + 2 B a b^{2}} \right )}}{a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**3/((b*x+a)**2)**(1/2),x)

[Out]

(-A*a + x*(2*A*b - 2*B*a))/(2*a**2*x**2) - b*(-A*b + B*a)*log(x + (-A*a*b**2 + B*a**2*b - a*b*(-A*b + B*a))/(-
2*A*b**3 + 2*B*a*b**2))/a**3 + b*(-A*b + B*a)*log(x + (-A*a*b**2 + B*a**2*b + a*b*(-A*b + B*a))/(-2*A*b**3 + 2
*B*a*b**2))/a**3

________________________________________________________________________________________